<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display"%>
<%@ taglib uri="/WEB-INF/config/tld/fmt.tld" prefix="fmt" %>
<%@ taglib uri="http://ssh.org/selects" prefix="ssh"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
String applicationPath = basePath + "/" + "application";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="<%=path%>/css/jinmu_style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="<%=path%>/js/util.js"></script>
		<script type='text/javascript' src='<%=path%>/frame/orgSelect/js/ajaxInitSelect.js'></script>
<script language="javascript" src="<%=path%>/js/SyncCommon.js"></script>
</head>
<body>
<html:form styleId="yfProjectForm" action="updateYfProject.do?method=updateYfProject" onsubmit="return save();">
<input type="hidden" name="id" value="${yfProject.id}"/> 
<table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="margtb5">
		    <tr>
		      <td align="left" class="padl5 lan12"><img src="<%=path%>/images/img-11.gif" width="12" height="12">项目管理 &gt; 发起项目 &gt; 编辑</td>
		    </tr>
       </table>
<table cellspacing="1" cellpadding="0" width="98%" align="center"  border="0" class="bgcolor2 margb5">
          <tr class="bgcolor">
              <td width="18%" align="right" class="zi13">项目编号：<font color="red">*&nbsp;</font></td>
			   <td width="32%"  align="left" class="pad2 zi13">
			      <input type="text" readonly="true"  id="projectNo" name="projectNo" value="${yfProject.projectNo}"/>
			 </td>
		       <td width="18%" align="right" class="zi13">项目名称：<font color="red">*&nbsp;</font></td>
			   <td width="32%"  align="left" class="pad2 zi13">
			        <input type="text" flag="true"  maxlength="60"  valid="required" errMsg="请输入项目名称！" id="projectName" name="projectName" value="${yfProject.projectName}"/>
			    </td>
		    
		  </tr> 
     
          <tr class="bgcolor">
             <td width="18%" align="right" class="zi13">项目类型：<font color="red">*&nbsp;</font></td>
			   <td width="32%"  align="left" class="pad2 zi13">
			      <ssh:select propertyName="projectType" pid="PROJECT_TYPE" type="1" defaultName="${yfProject.projectType}" />
			 </td>
		       <td width="18%" align="right" class="zi13">项目机构：<font color="red">*&nbsp;</font></td>
			   <td width="32%"  align="left" class="pad2 zi13"> 
			      <input type="hidden" id="projectOrg" name="projectOrg" value="${yfProject.projectOrg}" />
		            <ssh:select id="projectOrg" propertyName="projectOrg" firstShow="Y" dataSource="collection" selectList="${orgSelect}"  type="1" defaultName="${yfProject.projectOrg}"/>
		            </td>
		  </tr> 
		  
		     <tr class="bgcolor">
		       <td width="18%" align="right" class="zi13">发起人：<font color="red">*&nbsp;</font></td>
			   <td width="32%"  align="left" class="pad2 zi13"> 
			      <html:text property="initiatePerson" readonly="true" value="${yfProject.initiatePerson}"/></td>
		       <td width="18%" align="right" class="zi13">发起年份：<font color="red">*&nbsp;</font></td>
			   <td width="32%"  align="left" class="pad2 zi13">
			          <html:select property="initiateYear" style="width:100px" value="${yfProject.initiateYear}">
	                      	 <c:forEach var="i" begin="2010" end="2020" step="1">
	                      	 		<html:option value="${i}">${i}</html:option>
                             </c:forEach>
	                    </html:select>
	                    
			   
			 </td>
		  </tr> 
		    </tr> 
		    <tr class="bgcolor">
		       <td width="18%" align="right" class="zi13">项目经理：<font color="red">*&nbsp;</font></td>
			   <td   colspan="3" align="left" class="pad2 zi13"> 
			      
			        <input type="text" readonly="true" value="${yfProject.rname}"  id="uname" name="uname" />
			     
			      </td>
		      <input type="hidden" value="${yfProject.projectManager}"  id="projectManager" name="projectManager"/>
		  </tr> 
		  
		
    </table> 

		<p><p><p> 
       
             <table width="98%" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center">
 <input class="buttonbg" id="but_save" type="submit" value="<bean:message key='com.syc.common.yfmanager.save' bundle="yfmanager"/>" name="but_save" />
		  &nbsp;&nbsp;&nbsp;
		  <input class="buttonbg" id="but_return" type="button" value="<bean:message key='com.syc.common.yfmanager.return' bundle="yfmanager"/>" name="but_return" onClick="javascript:history.go(-1);"/>
  </tr>
</table>
</html:form>
</body>
</html>


<script>

function save(){
   var syncHelper = new SyncHelper();
   if(validateForm(document.forms[0],'Y'))
   {
       var projectType = syncHelper.selectedValue("projectType");
       if(projectType==null || projectType==""){
          alert("请选择项目类型！");
          return false;
       }
	return true;
    }else{
	return false;
    }
}


</script>




